<template>
  <div>
    <div class="login-dom">
      <span class="dn">查看行情价格，请先登录喔～</span>
      <span class="loginBtn" @click="showloginway">Login</span>
    </div>
    <van-popup  @click-overlay="closeShow" v-model="showlogin" round>
      <loginForm class="loginmodules"></loginForm>
    </van-popup>
  </div>
</template>
<script type="text/ecmascript-6">
import loginForm from "../components/login/index";
export default {
  components: {
    loginForm
  },
  data() {
    return {
      showlogin: false
    };
   },
  computed: {
    setshow(){
      return this.$store.state.nocaches.loginmoduleshow
    }
  },
  watch: {
    setshow(news,old){
      this.showlogin=news
    },
  },
   created () {
    this.$store.commit("muloginmoduleshow",false)
  },
  methods: {
    showloginway() {
      this.$store.commit("muloginmoduleshow",true)
    },
    closeShow(){
     this.$store.commit("muloginmoduleshow",false)
    }
  }
};
</script>

<style scoped lang="less">
.login-dom {
  position: fixed;
  bottom: 50px;
  width: 100%;
  height: 1rem;
  // line-height: 1rem;
  z-index: 111;
  font-size: 0.3rem;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px -2px 8px 0px rgba(0, 0, 0, 0.1);
  color: rgba(228, 152, 41, 1);
  padding: 0 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  .loginBtn {
    width: 2rem;
    height: 0.68rem;
    line-height: 0.68rem;
    text-align: center;
    color: #ffffff;
    background: #EC7A5DFF;
    border-radius: 0.08rem;
  }
}
.loginmodules {
  padding: 0.5rem 0.3rem !important;
  border-radius: 0.1rem;
}
</style>
